﻿namespace ECommerce.AuthService.Models;

/// <summary>
/// 刷新令牌实体，用于维持用户登录状态
/// </summary>
public class RefreshToken
{
    /// <summary>
    /// 主键
    /// </summary>
    public Guid Id { get; set; }

    /// <summary>
    /// 关联的用户ID
    /// </summary>
    public Guid UserId { get; set; }

    /// <summary>
    /// 刷新令牌字符串
    /// </summary>
    public string Token { get; set; } = string.Empty;

    /// <summary>
    /// 过期时间
    /// </summary>
    public DateTime ExpiresAt { get; set; }

    /// <summary>
    /// 是否已吊销
    /// </summary>
    public bool IsRevoked { get; set; }

    /// <summary>
    /// 吊销时间
    /// </summary>
    public DateTime? RevokedAt { get; set; }
}
